home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Dialogs.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  16.9 KB  |  494 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Dialogs.p
  3.  
  4.      Contains:    Dialog Manager interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Dialogs;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __DIALOGS__}
  28. {$SETC __DIALOGS__ := 1}
  29.  
  30. {$I+}
  31. {$SETC DialogsIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MIXEDMODE__}
  38. {$I MixedMode.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __EVENTS__}
  41. {$I Events.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __MACWINDOWS__}
  44. {$I MacWindows.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __TEXTEDIT__}
  47. {$I TextEdit.p}
  48. {$ENDC}
  49.  
  50.  
  51. {$PUSH}
  52. {$ALIGN MAC68K}
  53. {$LibExport+}
  54.  
  55.  
  56. CONST
  57.                                                                 {  new, more standard names for dialog item types }
  58.     kControlDialogItem            = 4;
  59.     kButtonDialogItem            = 4;
  60.     kCheckBoxDialogItem            = 5;
  61.     kRadioButtonDialogItem        = 6;
  62.     kResourceControlDialogItem    = 7;
  63.     kStaticTextDialogItem        = 8;
  64.     kEditTextDialogItem            = 16;
  65.     kIconDialogItem                = 32;
  66.     kPictureDialogItem            = 64;
  67.     kUserDialogItem                = 0;
  68.     kItemDisableBit                = 128;
  69.  
  70.                                                                 {  old names for dialog item types }
  71.     ctrlItem                    = 4;
  72.     btnCtrl                        = 0;
  73.     chkCtrl                        = 1;
  74.     radCtrl                        = 2;
  75.     resCtrl                        = 3;
  76.     statText                    = 8;
  77.     editText                    = 16;
  78.     iconItem                    = 32;
  79.     picItem                        = 64;
  80.     userItem                    = 0;
  81.     itemDisable                    = 128;
  82.  
  83.                                                                 {  standard dialog item numbers }
  84.     kStdOkItemIndex                = 1;
  85.     kStdCancelItemIndex            = 2;                            {  old names }
  86.     ok                            = 1;
  87.     cancel                        = 2;
  88.  
  89.                                                                 {  standard icon resource id's      }
  90.     kStopIcon                    = 0;
  91.     kNoteIcon                    = 1;
  92.     kCautionIcon                = 2;                            {  old names }
  93.     stopIcon                    = 0;
  94.     noteIcon                    = 1;
  95.     cautionIcon                    = 2;
  96.  
  97.  
  98.  
  99. {$IFC OLDROUTINENAMES }
  100. {
  101.    These constants lived briefly on ETO 16.  They suggest
  102.    that there is only one index you can use for the OK 
  103.    item, which is not true.  You can put the ok item 
  104.    anywhere you want in the DITL.
  105. }
  106.     kOkItemIndex                = 1;
  107.     kCancelItemIndex            = 2;
  108.  
  109. {$ENDC}  {OLDROUTINENAMES}
  110.  
  111. {    Dialog Item List Manipulation Constants    }
  112.  
  113. TYPE
  114.     DITLMethod                            = SInt16;
  115.  
  116. CONST
  117.     overlayDITL                    = 0;
  118.     appendDITLRight                = 1;
  119.     appendDITLBottom            = 2;
  120.  
  121.  
  122. TYPE
  123.     StageList                            = SInt16;
  124. {  DialogRef is obsolete. Use DialogPtr instead. }
  125.     DialogRef                            = DialogPtr;
  126.     DialogRecordPtr = ^DialogRecord;
  127.     DialogRecord = RECORD
  128.         window:                    WindowRecord;
  129.         items:                    Handle;
  130.         textH:                    TEHandle;
  131.         editField:                SInt16;
  132.         editOpen:                SInt16;
  133.         aDefItem:                SInt16;
  134.     END;
  135.  
  136.     DialogPeek                            = ^DialogRecord;
  137.     DialogTemplatePtr = ^DialogTemplate;
  138.     DialogTemplate = RECORD
  139.         boundsRect:                Rect;
  140.         procID:                    SInt16;
  141.         visible:                BOOLEAN;
  142.         filler1:                BOOLEAN;
  143.         goAwayFlag:                BOOLEAN;
  144.         filler2:                BOOLEAN;
  145.         refCon:                    SInt32;
  146.         itemsID:                SInt16;
  147.         title:                    Str255;
  148.     END;
  149.  
  150.     DialogTPtr                            = ^DialogTemplate;
  151.     DialogTHndl                            = ^DialogTPtr;
  152.     AlertTemplatePtr = ^AlertTemplate;
  153.     AlertTemplate = RECORD
  154.         boundsRect:                Rect;
  155.         itemsID:                SInt16;
  156.         stages:                    StageList;
  157.     END;
  158.  
  159.     AlertTPtr                            = ^AlertTemplate;
  160.     AlertTHndl                            = ^AlertTPtr;
  161. { new type abstractions for the dialog manager }
  162.     DialogItemIndexZeroBased            = SInt16;
  163.     DialogItemIndex                        = SInt16;
  164.     DialogItemType                        = SInt16;
  165. { dialog manager callbacks }
  166.     SoundProcPtr = ProcPtr;  { PROCEDURE Sound(soundNumber: SInt16); }
  167.  
  168.     ModalFilterProcPtr = ProcPtr;  { FUNCTION ModalFilter(theDialog: DialogPtr; VAR theEvent: EventRecord; VAR itemHit: DialogItemIndex): BOOLEAN; }
  169.  
  170.     UserItemProcPtr = ProcPtr;  { PROCEDURE UserItem(theWindow: WindowPtr; itemNo: DialogItemIndex); }
  171.  
  172.     SoundUPP = UniversalProcPtr;
  173.     ModalFilterUPP = UniversalProcPtr;
  174.     UserItemUPP = UniversalProcPtr;
  175.  
  176. CONST
  177.     uppSoundProcInfo = $00000080;
  178.     uppModalFilterProcInfo = $00000FD0;
  179.     uppUserItemProcInfo = $000002C0;
  180.  
  181. FUNCTION NewSoundProc(userRoutine: SoundProcPtr): SoundUPP;
  182.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  183.     INLINE $2E9F;
  184.     {$ENDC}
  185.  
  186. FUNCTION NewModalFilterProc(userRoutine: ModalFilterProcPtr): ModalFilterUPP;
  187.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  188.     INLINE $2E9F;
  189.     {$ENDC}
  190.  
  191. FUNCTION NewUserItemProc(userRoutine: UserItemProcPtr): UserItemUPP;
  192.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  193.     INLINE $2E9F;
  194.     {$ENDC}
  195.  
  196. PROCEDURE CallSoundProc(soundNumber: SInt16; userRoutine: SoundUPP);
  197.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  198.     INLINE $205F, $4E90;
  199.     {$ENDC}
  200.  
  201. FUNCTION CallModalFilterProc(theDialog: DialogPtr; VAR theEvent: EventRecord; VAR itemHit: DialogItemIndex; userRoutine: ModalFilterUPP): BOOLEAN;
  202.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  203.     INLINE $205F, $4E90;
  204.     {$ENDC}
  205.  
  206. PROCEDURE CallUserItemProc(theWindow: WindowPtr; itemNo: DialogItemIndex; userRoutine: UserItemUPP);
  207.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  208.     INLINE $205F, $4E90;
  209.     {$ENDC}
  210.  
  211. {
  212.     NOTE: Code running under MultiFinder or System 7.0 or newer
  213.     should always pass NULL to InitDialogs.
  214. }
  215. PROCEDURE InitDialogs(ignored: UNIV Ptr);
  216.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  217.     INLINE $A97B;
  218.     {$ENDC}
  219. PROCEDURE ErrorSound(soundProc: SoundUPP);
  220.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  221.     INLINE $A98C;
  222.     {$ENDC}
  223. FUNCTION NewDialog(dStorage: UNIV Ptr; {CONST}VAR boundsRect: Rect; title: ConstStr255Param; visible: BOOLEAN; procID: SInt16; behind: WindowPtr; goAwayFlag: BOOLEAN; refCon: SInt32; items: Handle): DialogPtr;
  224.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  225.     INLINE $A97D;
  226.     {$ENDC}
  227. FUNCTION GetNewDialog(dialogID: SInt16; dStorage: UNIV Ptr; behind: WindowPtr): DialogPtr;
  228.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  229.     INLINE $A97C;
  230.     {$ENDC}
  231. FUNCTION NewColorDialog(dStorage: UNIV Ptr; {CONST}VAR boundsRect: Rect; title: ConstStr255Param; visible: BOOLEAN; procID: SInt16; behind: WindowPtr; goAwayFlag: BOOLEAN; refCon: SInt32; items: Handle): DialogPtr;
  232.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  233.     INLINE $AA4B;
  234.     {$ENDC}
  235. PROCEDURE CloseDialog(theDialog: DialogPtr);
  236.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  237.     INLINE $A982;
  238.     {$ENDC}
  239. PROCEDURE DisposeDialog(theDialog: DialogPtr);
  240.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  241.     INLINE $A983;
  242.     {$ENDC}
  243. PROCEDURE ModalDialog(modalFilter: ModalFilterUPP; VAR itemHit: DialogItemIndex);
  244.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  245.     INLINE $A991;
  246.     {$ENDC}
  247. FUNCTION IsDialogEvent({CONST}VAR theEvent: EventRecord): BOOLEAN;
  248.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  249.     INLINE $A97F;
  250.     {$ENDC}
  251. FUNCTION DialogSelect({CONST}VAR theEvent: EventRecord; VAR theDialog: DialogPtr; VAR itemHit: DialogItemIndex): BOOLEAN;
  252.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  253.     INLINE $A980;
  254.     {$ENDC}
  255. PROCEDURE DrawDialog(theDialog: DialogPtr);
  256.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  257.     INLINE $A981;
  258.     {$ENDC}
  259. PROCEDURE UpdateDialog(theDialog: DialogPtr; updateRgn: RgnHandle);
  260.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  261.     INLINE $A978;
  262.     {$ENDC}
  263. PROCEDURE HideDialogItem(theDialog: DialogPtr; itemNo: DialogItemIndex);
  264.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  265.     INLINE $A827;
  266.     {$ENDC}
  267. PROCEDURE ShowDialogItem(theDialog: DialogPtr; itemNo: DialogItemIndex);
  268.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  269.     INLINE $A828;
  270.     {$ENDC}
  271. FUNCTION FindDialogItem(theDialog: DialogPtr; thePt: Point): DialogItemIndexZeroBased;
  272.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  273.     INLINE $A984;
  274.     {$ENDC}
  275. PROCEDURE DialogCut(theDialog: DialogPtr);
  276. PROCEDURE DialogPaste(theDialog: DialogPtr);
  277. PROCEDURE DialogCopy(theDialog: DialogPtr);
  278. PROCEDURE DialogDelete(theDialog: DialogPtr);
  279. FUNCTION Alert(alertID: SInt16; modalFilter: ModalFilterUPP): DialogItemIndex;
  280.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  281.     INLINE $A985;
  282.     {$ENDC}
  283. FUNCTION StopAlert(alertID: SInt16; modalFilter: ModalFilterUPP): DialogItemIndex;
  284.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  285.     INLINE $A986;
  286.     {$ENDC}
  287. FUNCTION NoteAlert(alertID: SInt16; modalFilter: ModalFilterUPP): DialogItemIndex;
  288.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  289.     INLINE $A987;
  290.     {$ENDC}
  291. FUNCTION CautionAlert(alertID: SInt16; modalFilter: ModalFilterUPP): DialogItemIndex;
  292.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  293.     INLINE $A988;
  294.     {$ENDC}
  295. PROCEDURE GetDialogItem(theDialog: DialogPtr; itemNo: DialogItemIndex; VAR itemType: DialogItemType; VAR item: Handle; VAR box: Rect);
  296.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  297.     INLINE $A98D;
  298.     {$ENDC}
  299. PROCEDURE SetDialogItem(theDialog: DialogPtr; itemNo: DialogItemIndex; itemType: DialogItemType; item: Handle; {CONST}VAR box: Rect);
  300.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  301.     INLINE $A98E;
  302.     {$ENDC}
  303. PROCEDURE ParamText(param0: ConstStr255Param; param1: ConstStr255Param; param2: ConstStr255Param; param3: ConstStr255Param);
  304.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  305.     INLINE $A98B;
  306.     {$ENDC}
  307. PROCEDURE SelectDialogItemText(theDialog: DialogPtr; itemNo: DialogItemIndex; strtSel: SInt16; endSel: SInt16);
  308.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  309.     INLINE $A97E;
  310.     {$ENDC}
  311. PROCEDURE GetDialogItemText(item: Handle; VAR text: Str255);
  312.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  313.     INLINE $A990;
  314.     {$ENDC}
  315. PROCEDURE SetDialogItemText(item: Handle; text: ConstStr255Param);
  316.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  317.     INLINE $A98F;
  318.     {$ENDC}
  319. FUNCTION GetAlertStage: SInt16;
  320.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  321.     INLINE $3EB8, $0A9A;
  322.     {$ENDC}
  323. PROCEDURE SetDialogFont(value: SInt16);
  324.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  325.     INLINE $31DF, $0AFA;
  326.     {$ENDC}
  327. PROCEDURE ResetAlertStage;
  328.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  329.     INLINE $4278, $0A9A;
  330.     {$ENDC}
  331.  
  332. PROCEDURE AppendDITL(theDialog: DialogPtr; theHandle: Handle; method: DITLMethod);
  333. FUNCTION CountDITL(theDialog: DialogPtr): DialogItemIndex;
  334. PROCEDURE ShortenDITL(theDialog: DialogPtr; numberItems: DialogItemIndex);
  335. FUNCTION StdFilterProc(theDialog: DialogPtr; VAR event: EventRecord; VAR itemHit: DialogItemIndex): BOOLEAN;
  336. FUNCTION GetStdFilterProc(VAR theProc: ModalFilterUPP): OSErr;
  337.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  338.     INLINE $303C, $0203, $AA68;
  339.     {$ENDC}
  340. FUNCTION SetDialogDefaultItem(theDialog: DialogPtr; newItem: DialogItemIndex): OSErr;
  341.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  342.     INLINE $303C, $0304, $AA68;
  343.     {$ENDC}
  344. FUNCTION SetDialogCancelItem(theDialog: DialogPtr; newItem: DialogItemIndex): OSErr;
  345.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  346.     INLINE $303C, $0305, $AA68;
  347.     {$ENDC}
  348. FUNCTION SetDialogTracksCursor(theDialog: DialogPtr; tracks: BOOLEAN): OSErr;
  349.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  350.     INLINE $303C, $0306, $AA68;
  351.     {$ENDC}
  352. {$IFC OLDROUTINENAMES }
  353. PROCEDURE DisposDialog(theDialog: DialogPtr);
  354.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  355.     INLINE $A983;
  356.     {$ENDC}
  357. PROCEDURE UpdtDialog(theDialog: DialogPtr; updateRgn: RgnHandle);
  358.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  359.     INLINE $A978;
  360.     {$ENDC}
  361. PROCEDURE GetDItem(theDialog: DialogPtr; itemNo: DialogItemIndex; VAR itemType: DialogItemType; VAR item: Handle; VAR box: Rect);
  362.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  363.     INLINE $A98D;
  364.     {$ENDC}
  365. PROCEDURE SetDItem(theDialog: DialogPtr; itemNo: DialogItemIndex; itemType: DialogItemType; item: Handle; {CONST}VAR box: Rect);
  366.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  367.     INLINE $A98E;
  368.     {$ENDC}
  369. PROCEDURE HideDItem(theDialog: DialogPtr; itemNo: DialogItemIndex);
  370.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  371.     INLINE $A827;
  372.     {$ENDC}
  373. PROCEDURE ShowDItem(theDialog: DialogPtr; itemNo: DialogItemIndex);
  374.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  375.     INLINE $A828;
  376.     {$ENDC}
  377. PROCEDURE SelIText(theDialog: DialogPtr; itemNo: DialogItemIndex; strtSel: SInt16; endSel: SInt16);
  378.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  379.     INLINE $A97E;
  380.     {$ENDC}
  381. PROCEDURE GetIText(item: Handle; VAR text: Str255);
  382.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  383.     INLINE $A990;
  384.     {$ENDC}
  385. PROCEDURE SetIText(item: Handle; text: Str255);
  386.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  387.     INLINE $A98F;
  388.     {$ENDC}
  389. FUNCTION FindDItem(theDialog: DialogPtr; thePt: Point): DialogItemIndexZeroBased;
  390.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  391.     INLINE $A984;
  392.     {$ENDC}
  393. FUNCTION NewCDialog(dStorage: UNIV Ptr; {CONST}VAR boundsRect: Rect; title: Str255; visible: BOOLEAN; procID: SInt16; behind: WindowPtr; goAwayFlag: BOOLEAN; refCon: SInt32; items: Handle): DialogPtr;
  394.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  395.     INLINE $AA4B;
  396.     {$ENDC}
  397. PROCEDURE DlgCut(theDialog: DialogPtr);
  398. PROCEDURE DlgPaste(theDialog: DialogPtr);
  399. PROCEDURE DlgCopy(theDialog: DialogPtr);
  400. PROCEDURE DlgDelete(theDialog: DialogPtr);
  401. PROCEDURE SetDAFont(fontNum: SInt16);
  402.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  403.     INLINE $31DF, $0AFA;
  404.     {$ENDC}
  405. {$ENDC}  {OLDROUTINENAMES}
  406.  
  407. {
  408.     *****************************************************************************
  409.     *                                                                           *
  410.     * The conditional STRICT_DIALOGS has been removed from this interface file. *
  411.     * The accessor macros to a DialogRecord are no longer necessary.            *
  412.     *                                                                           *
  413.     * All ≈Ref Types have reverted to their original Handle and Ptr Types.      *
  414.     *                                                                           *
  415.     *****************************************************************************
  416.  
  417.     Details:
  418.     The original purpose of the STRICT_ conditionals and accessor macros was to
  419.     help ease the transition to Copland.  Shared data structures are difficult
  420.     to coordinate in a preemptive multitasking OS.  By hiding the fields in a
  421.     WindowRecord and other data structures, we would begin the migration to the
  422.     discipline wherein system data structures are completely hidden from
  423.     applications.
  424.     
  425.     After many design reviews, we finally concluded that with this sort of
  426.     migration, the system could never tell when an application was no longer
  427.     peeking at a WindowRecord, and thus the data structure might never become
  428.     system owned.  Additionally, there were many other limitations in the
  429.     classic toolbox that were begging to be addressed.  The final decision was
  430.     to leave the traditional toolbox as a compatibility mode.
  431.     
  432.     We also decided to use the Handle and Ptr based types in the function
  433.     declarations.  For example, NewWindow now returns a WindowPtr rather than a
  434.     WindowRef.  The Ref types are still defined in the header files, so all
  435.     existing code will still compile exactly as it did before.  There are
  436.     several reasons why we chose to do this:
  437.     
  438.     - The importance of backwards compatibility makes it unfeasible for us to
  439.     enforce real opaque references in the implementation anytime in the
  440.     foreseeable future.  Therefore, any opaque data types (e.g. WindowRef,
  441.     ControlRef, etc.) in the documentation and header files would always be a
  442.     fake veneer of opacity.
  443.     
  444.     - There exists a significant base of books and sample code that neophyte
  445.     Macintosh developers use to learn how to program the Macintosh.  These
  446.     books and sample code all use direct data access.  Introducing opaque data
  447.     types at this point would confuse neophyte programmers more than it would
  448.     help them.
  449.     
  450.     - Direct data structure access is used by nearly all Macintosh developers. 
  451.     Changing the interfaces to reflect a false opacity would not provide any
  452.     benefit to these developers.
  453.     
  454.     - Accessor functions are useful in and of themselves as convenience
  455.     functions, without being tied to opaque data types.  We will complete and
  456.     document the Windows and Dialogs accessor functions in an upcoming release
  457.     of the interfaces.
  458. }
  459.  
  460.  
  461. PROCEDURE CouldDialog(dialogID: SInt16);
  462.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  463.     INLINE $A979;
  464.     {$ENDC}
  465. PROCEDURE FreeDialog(dialogID: SInt16);
  466.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  467.     INLINE $A97A;
  468.     {$ENDC}
  469. PROCEDURE CouldAlert(alertID: SInt16);
  470.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  471.     INLINE $A989;
  472.     {$ENDC}
  473. PROCEDURE FreeAlert(alertID: SInt16);
  474.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  475.     INLINE $A98A;
  476.     {$ENDC}
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484. {$ALIGN RESET}
  485. {$POP}
  486.  
  487. {$SETC UsingIncludes := DialogsIncludes}
  488.  
  489. {$ENDC} {__DIALOGS__}
  490.  
  491. {$IFC NOT UsingIncludes}
  492.  END.
  493. {$ENDC}
  494.